package com.practice;

import java.util.TimerTask;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class Log4jTask extends TimerTask {
	private final Log log = LogFactory.getLog(getClass());
	
	@Override
	public void run() {
		if (log.isDebugEnabled()){
			log.debug("111");
		}
		
		if (log.isInfoEnabled()){
			log.info("222");
		}
			
		if (log.isWarnEnabled()){
			log.warn("333");
		}
			
		if (log.isErrorEnabled()){
			log.error("444");
		}
			
		if (log.isFatalEnabled()){
			log.fatal("555");
		}
	}

}
